home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nibble Magazine
/
nib01.dsk
/
STAR ATTACK BASIC.int
< prev
next >
Wrap
Text File
|
2023-02-26
|
4KB
|
101 lines
1 REM ***********************
2 REM ** STAR ATTACK BASIC **
3 REM ** MICRO-SPARC **
4 REM ** P.O. BOX 325 **
5 REM ** LINCOLN MASS 01773**
6 REM ** COPYRIGHT C 1979 **
7 REM ***********************
8 REM
9 PRINT ""
10 REM USE LOMEM:4096 AND HIMEM:8192
15 GOSUB 2000: POKE 17227,0
16 POKE 17226,0
17 TEXT
20 CALL 17434
21 GOSUB 2050:GOTO 26
24 CALL 17563
26 X= PEEK (17226):IF X>0 THEN GOSUB X*100
31 X= PEEK (17227):IF S<>T THEN GOSUB 800:T=S
40 N=N-1:VTAB 21:TAB 16:PRINT N
45 IF N=1000 OR N=100 THEN GOSUB 5000
50 IF S>100 OR N=0 THEN 3000
55 GOTO 24
100 POKE 17226,0:VTAB 23:TAB 10:PRINT A$;:TAB 37:PRINT "+50":X=0
105 SC=SC+50:VTAB 22:TAB 36:CALL -868:PRINT SC:A=A+1:RETURN
200 POKE 17226,0:VTAB 23:TAB 10:PRINT B$;:TAB 37:PRINT "+40":X=0
205 SC=SC+40:VTAB 22:TAB 36:CALL -868:PRINT SC:B=B+1:RETURN
300 POKE 17226,0:VTAB 23:TAB 10:PRINT C$;:TAB 37:PRINT "-50":X=0
305 SC=SC-50:VTAB 22:TAB 36:CALL -868:PRINT SC:C=C+1:RETURN
400 POKE 17226,0:VTAB 23:TAB 10:PRINT D$;:TAB 37:PRINT "+30":X=0
405 SC=SC+30:VTAB 22:TAB 36:CALL -868:PRINT SC:D=D+1:RETURN
500 POKE 17226,0:VTAB 23:TAB 10:PRINT E$;:TAB 37:PRINT "+20":X=0
505 SC=SC+20:VTAB 22:TAB 36:CALL -868:PRINT SC:E=E+1:RETURN
600 POKE 17226,0:VTAB 23:TAB 10:PRINT F$;:TAB 37:PRINT "-40":X=0
605 SC=SC-40:VTAB 22:TAB 36:CALL -868:PRINT SC:F=F+1:RETURN
700 POKE 17226,0:VTAB 23:TAB 10:PRINT G$;:TAB 37:PRINT "-20":X=0
705 SC=SC-20:VTAB 22:TAB 36:CALL -868:PRINT SC:G=G+1:RETURN
800 VTAB 21:TAB 32:CALL -868:PRINT S:RETURN
1000 END
2000 DIM A$(20),B$(20),C$(20),D$(20),E$(20),F$(20),G$(20),X$(2),M$(40),BB$(4)
2005 BB$=" ":A$=" TIE FIGHTER ":B$=" KLINGON CRUISER":C$=" HOSPITAL SHIP "
2010 D$=" KLINGON FIGHTER":E$=" TIE SUPPLY SHIP":F$=" TWA FREIGHTER "
2015 G$=" COMM SATELLITE ":CALL -936:N=4000:RETURN
2050 VTAB 21:PRINT "TIME LEFT..";:TAB 26:PRINT "SHOTS USED.."
2055 PRINT "PREV HIGH SCORE=";HS;:TAB 26:PRINT "SCORE="
2065 VTAB 23:PRINT "LAST HIT=";:TAB 27:PRINT "SCORING.."
2070 POKE 812,255
2072 FOR I=1 TO 100:XX= RND (250):YY= RND (120)
2074 POKE 800,XX: POKE 802,YY:CALL 3780:NEXT I
2078 POKE 800,0: POKE 802,0:CALL 3780
2080 POKE 800,255: POKE 802,0:CALL 3786
2082 POKE 800,255: POKE 802,159:CALL 3786
2084 POKE 800,0: POKE 802,159:CALL 3786
2086 POKE 800,0: POKE 802,0:CALL 3786
2088 POKE 800,0: POKE 802,130:CALL 3780
2090 POKE 800,124: POKE 802,154:CALL 3786
2092 POKE 800,136: POKE 802,154:CALL 3786
2094 POKE 800,255: POKE 802,130:CALL 3786
2096 POKE 800,0: POKE 802,140:CALL 3780
2098 POKE 800,124: POKE 802,156:CALL 3786
2100 POKE 800,136: POKE 802,156:CALL 3786
2102 POKE 800,255: POKE 802,140:CALL 3786
2200 RETURN
3000 TEXT :CALL -936
3005 IF SC>HS THEN GOSUB 3500:GOSUB 4000
3008 VTAB 21:INPUT "ANOTHER MISSION? HIT RETURN",X$:GOSUB 2015
3015 SC=0: POKE 17227,0:REM RESET SCORE AND # OF SHOTS
3020 A=0:B=0:C=0:D=0:E=0:F=0:G=0:GOTO 20
3500 PRINT "YOUR SCORE OF ";SC;" HAS BEATEN THE":PRINT "PREVIOUS HIGH SCORE OF..";HS
3505 PRINT "CONGRATULATIONS!"
3510 HS=SC:RETURN
4000 VTAB 6:TAB 5:PRINT "YOU SHOT DOWN....."
4005 VTAB 7:TAB 16:PRINT A;"..";A$
4006 VTAB 8:TAB 16:PRINT B;"..";B$
4008 VTAB 9:TAB 16:PRINT C;"..";C$
4010 VTAB 10:TAB 16:PRINT D;"..";D$
4012 VTAB 11:TAB 16:PRINT E;"..";E$
4014 VTAB 12:TAB 16:PRINT F;"..";F$
4016 VTAB 13:TAB 16:PRINT G;"..";G$
4020 IF SC<100 THEN 4100:IF SC<200 THEN 4120:IF SC<300 THEN 4130:IF SC<500 THEN 4140
4030 IF SC<650 THEN 4150:IF SC<750 THEN 4160:IF SC<850 THEN 4170:IF SC<1000 THEN 4180
4040 GOTO 4190
4100 M$="LOUSY":GOTO 4500
4120 M$="POOR":GOTO 4500
4130 M$="FAIR":GOTO 4500
4140 M$="NOT BAD..APPRENTICE RATING"
4142 GOTO 4500
4150 M$="GOOD..PROMOTED TO EXEC OFFICER."
4152 GOTO 4500
4160 M$="VERY GOOD..PROMOTED TO FIRST OFFICER"
4162 GOTO 4500
4170 M$="EXCELLENT! PROMOTED TO CAPTAIN!"
4172 GOTO 4500
4180 M$="OUTSTANDING! PROMOTED TO REAR ADMIRAL"
4182 GOTO 4500
4190 M$="SPECTACULAR! PROMOTED TO FLEET ADMIRAL"
4192 GOTO 4500
4500 VTAB 18:PRINT "YOUR SCORE OF..";SC;" WAS R<CTRL-A>ATED:"
4505 VTAB 19:TAB 4:PRINT M$:RETURN
5000 VTAB 21:TAB 16:PRINT BB$
5005 RETURN